/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kcth.sylyg08.entity;

import javax.persistence.*;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author liuqi
 */
@Entity
@Table(name = "t_syly_trans_sequences",indexes = {@Index(name = "INX_NAMEUNIQUE",  columnList="name", unique = true)})
public class TransSequences implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @Basic(optional = false)
    @Size(min = 1, max = 50)
    @Column(name = "NAME")
    private String name;
    @Basic(optional = false)
    @Column(name = "CURRENT_VALUE")
    private long currentValue;
    @Basic(optional = false)
    @Column(name = "INCREMENT")
    private int increment;
    @Basic(optional = false)
    @Column(name = "MAX_VALUE")
    private long maxValue;
    @Basic(optional = false)
    @Column(name = "CYCLE")
    private int cycle;
    @Column(name = "lasterTime", columnDefinition = "DATETIME default CURRENT_TIMESTAMP")
    private Date lasterTime;

    public TransSequences() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getCurrentValue() {
        return currentValue;
    }

    public void setCurrentValue(long currentValue) {
        this.currentValue = currentValue;
    }

    public int getIncrement() {
        return increment;
    }

    public void setIncrement(int increment) {
        this.increment = increment;
    }

    public long getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(long maxValue) {
        this.maxValue = maxValue;
    }

    public int getCycle() {
        return cycle;
    }

    public void setCycle(int cycle) {
        this.cycle = cycle;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getLasterTime() {
        return lasterTime;
    }

    public void setLasterTime(Date lasterTime) {
        this.lasterTime = lasterTime;
    }
}
